home *** CD-ROM | disk | FTP | other *** search
- /* Definitions for the Calendar-Program */
-
- #include <intuition/intuition.h> /* Include few headers */
- #include <graphics/gfxbase.h>
- #include <libraries/dos.h>
- #include <workbench/workbench.h>
- #include <workbench/startup.h>
- #include <exec/memory.h>
- #include <exec/types.h>
- #include <devices/console.h>
- #include <stdio.h>
- #include <time.h>
-
- #include <clib/alib_protos.h>
- #include <clib/intuition_protos.h>
- #include <clib/graphics_protos.h>
- #include <clib/dos_protos.h>
- #include <clib/exec_protos.h>
- #include <clib/icon_protos.h>
- #include <clib/console_protos.h>
-
- #define RELEASE 1
- #define REVISION 10
-
- #ifdef GERMAN
- #define WINTITLE "MS-Calendar 1.10 German"
- #define WEEKDAYS "Mon Die Mit Don Fre Sam Son"
- #else
- #define WEEKDAYS "Mon Tue Wed Thu Fri Sat Sun"
- #define WINTITLE "MS-Calendar 1.10"
- #endif
- #define WEEKDAYLENGTH strlen(WEEKDAYS)
-
- #define SHIFT 0x8002
- #define SHIFTR 0x8202
- #define RIGHT 0x4E
- #define LEFT 0x4F
- #define UP 0x4C
- #define DOWN 0x4D
-
- typedef struct IntuitionBase IBASE;
- typedef struct GfxBase GFXBASE;
- typedef struct Window WIN;
- typedef struct Screen SCR;
- typedef struct RastPort RPORT;
- typedef struct tm TM;
- typedef struct IntuiMessage IMSG;
- typedef struct Message MSG;
- typedef struct MsgPort MSGP;
- typedef struct TextFont TF;
- typedef struct timerequest TR;
- typedef struct IORequest IOR;
-
- struct Date
- {
- int d,m,y;
- };
-
- struct Calendar
- {
- struct Date cald;
- BOOL Iconify;
- BOOL Beep;
- BOOL Front;
- UWORD xpos,ypos;
- UWORD height,width;
- UWORD ixpos,iypos;
- UWORD iheight,iwidth;
- WIN *calwin;
- RPORT *rp;
- };
-
- typedef struct Calendar CAL;
-
- struct Gadget todayswitch =
- {
- NULL,
- 0,0,
- 0,0,
- GADGHCOMP,
- GADGIMMEDIATE|
- RELVERIFY,
- BOOLGADGET,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- 0,
- NULL
- };
-
- struct NewWindow calwin_data =
- {
- 0,0,
- 0,0,
- 0,1,
- CLOSEWINDOW| /* IDCMP */
- MOUSEBUTTONS|
- GADGETUP|
- GADGETDOWN,
- SMART_REFRESH| /* Flags */
- RMBTRAP|
- NOCAREREFRESH|
- WINDOWCLOSE|
- WINDOWDRAG|
- WINDOWDEPTH,
- &todayswitch,
- NULL,
- (UBYTE *) WINTITLE, /* Title Title of the window. */
- NULL,
- NULL,
- 20,10,
- 640,
- 200,
- WBENCHSCREEN
- };
-
- SHORT boxdata[] =
- {
- 0,0,
- 22,0,
- 22,12,
- 0,12,
- 0,0
- };
-
- struct Border dayborder =
- {
- 0,0,
- 0,1,
- JAM1,
- 5,
- boxdata,
- NULL
- };
-
-